Optimal. Leaf size=84 \[ -\frac{3}{16} \sqrt{\frac{\pi }{2}} \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )+\frac{1}{48} \sqrt{\frac{\pi }{6}} \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )+\frac{1}{6} x^3 \sin ^3\left (x^2\right )-\frac{1}{12} x \cos ^3\left (x^2\right )+\frac{1}{4} x \cos \left (x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0776766, antiderivative size = 84, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3443, 3403, 3385, 3352} \[ -\frac{3}{16} \sqrt{\frac{\pi }{2}} \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )+\frac{1}{48} \sqrt{\frac{\pi }{6}} \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )+\frac{1}{6} x^3 \sin ^3\left (x^2\right )+\frac{3}{16} x \cos \left (x^2\right )-\frac{1}{48} x \cos \left (3 x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3443
Rule 3403
Rule 3385
Rule 3352
Rubi steps
\begin{align*} \int x^4 \cos \left (x^2\right ) \sin ^2\left (x^2\right ) \, dx &=\frac{1}{6} x^3 \sin ^3\left (x^2\right )-\frac{1}{2} \int x^2 \sin ^3\left (x^2\right ) \, dx\\ &=\frac{1}{6} x^3 \sin ^3\left (x^2\right )-\frac{1}{2} \int \left (\frac{3}{4} x^2 \sin \left (x^2\right )-\frac{1}{4} x^2 \sin \left (3 x^2\right )\right ) \, dx\\ &=\frac{1}{6} x^3 \sin ^3\left (x^2\right )+\frac{1}{8} \int x^2 \sin \left (3 x^2\right ) \, dx-\frac{3}{8} \int x^2 \sin \left (x^2\right ) \, dx\\ &=\frac{3}{16} x \cos \left (x^2\right )-\frac{1}{48} x \cos \left (3 x^2\right )+\frac{1}{6} x^3 \sin ^3\left (x^2\right )+\frac{1}{48} \int \cos \left (3 x^2\right ) \, dx-\frac{3}{16} \int \cos \left (x^2\right ) \, dx\\ &=\frac{3}{16} x \cos \left (x^2\right )-\frac{1}{48} x \cos \left (3 x^2\right )-\frac{3}{16} \sqrt{\frac{\pi }{2}} C\left (\sqrt{\frac{2}{\pi }} x\right )+\frac{1}{48} \sqrt{\frac{\pi }{6}} C\left (\sqrt{\frac{6}{\pi }} x\right )+\frac{1}{6} x^3 \sin ^3\left (x^2\right )\\ \end{align*}
Mathematica [A] time = 0.148881, size = 75, normalized size = 0.89 \[ \frac{1}{288} \left (-27 \sqrt{2 \pi } \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )+\sqrt{6 \pi } \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )+6 x \left (8 x^2 \sin ^3\left (x^2\right )+9 \cos \left (x^2\right )-\cos \left (3 x^2\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 78, normalized size = 0.9 \begin{align*}{\frac{{x}^{3}\sin \left ({x}^{2} \right ) }{8}}+{\frac{3\,x\cos \left ({x}^{2} \right ) }{16}}-{\frac{3\,\sqrt{2}\sqrt{\pi }}{32}{\it FresnelC} \left ({\frac{x\sqrt{2}}{\sqrt{\pi }}} \right ) }-{\frac{{x}^{3}\sin \left ( 3\,{x}^{2} \right ) }{24}}-{\frac{x\cos \left ( 3\,{x}^{2} \right ) }{48}}+{\frac{\sqrt{2}\sqrt{\pi }\sqrt{3}}{288}{\it FresnelC} \left ({\frac{\sqrt{2}\sqrt{3}x}{\sqrt{\pi }}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.53842, size = 158, normalized size = 1.88 \begin{align*} -\frac{1}{24} \, x^{3} \sin \left (3 \, x^{2}\right ) + \frac{1}{8} \, x^{3} \sin \left (x^{2}\right ) - \frac{1}{48} \, x \cos \left (3 \, x^{2}\right ) + \frac{3}{16} \, x \cos \left (x^{2}\right ) - \frac{1}{2304} \, \sqrt{\pi }{\left (\left (2 i - 2\right ) \, \sqrt{3} \sqrt{2} \operatorname{erf}\left (\sqrt{3 i} x\right ) - \left (2 i + 2\right ) \, \sqrt{3} \sqrt{2} \operatorname{erf}\left (\sqrt{-3 i} x\right ) - \left (27 i - 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} x\right ) - \left (27 i + 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} x\right ) + \left (27 i + 27\right ) \, \sqrt{2} \operatorname{erf}\left (\sqrt{-i} x\right ) - \left (27 i - 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (-1\right )^{\frac{1}{4}} x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.19345, size = 254, normalized size = 3.02 \begin{align*} -\frac{1}{12} \, x \cos \left (x^{2}\right )^{3} + \frac{1}{4} \, x \cos \left (x^{2}\right ) + \frac{1}{288} \, \sqrt{6} \sqrt{\pi } \operatorname{C}\left (\frac{\sqrt{6} x}{\sqrt{\pi }}\right ) - \frac{3}{32} \, \sqrt{2} \sqrt{\pi } \operatorname{C}\left (\frac{\sqrt{2} x}{\sqrt{\pi }}\right ) - \frac{1}{6} \,{\left (x^{3} \cos \left (x^{2}\right )^{2} - x^{3}\right )} \sin \left (x^{2}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 6.09948, size = 291, normalized size = 3.46 \begin{align*} - \frac{9 x^{5} \Gamma \left (- \frac{9}{4}\right )}{40 \Gamma \left (- \frac{5}{4}\right )} + \frac{9 x^{3} \sin{\left (x^{2} \right )} \Gamma \left (- \frac{9}{4}\right )}{32 \Gamma \left (- \frac{5}{4}\right )} - \frac{5 x^{3} \sin{\left (x^{2} \right )} \Gamma \left (- \frac{5}{4}\right )}{16 \Gamma \left (- \frac{1}{4}\right )} + \frac{3 x^{3} \sin{\left (3 x^{2} \right )} \Gamma \left (- \frac{9}{4}\right )}{32 \Gamma \left (- \frac{5}{4}\right )} + \frac{27 x \cos{\left (x^{2} \right )} \Gamma \left (- \frac{9}{4}\right )}{64 \Gamma \left (- \frac{5}{4}\right )} - \frac{15 x \cos{\left (x^{2} \right )} \Gamma \left (- \frac{5}{4}\right )}{32 \Gamma \left (- \frac{1}{4}\right )} + \frac{3 x \cos{\left (3 x^{2} \right )} \Gamma \left (- \frac{9}{4}\right )}{64 \Gamma \left (- \frac{5}{4}\right )} + \frac{15 \sqrt{2} \sqrt{\pi } C\left (\frac{\sqrt{2} x}{\sqrt{\pi }}\right ) \Gamma \left (- \frac{5}{4}\right )}{64 \Gamma \left (- \frac{1}{4}\right )} - \frac{27 \sqrt{2} \sqrt{\pi } C\left (\frac{\sqrt{2} x}{\sqrt{\pi }}\right ) \Gamma \left (- \frac{9}{4}\right )}{128 \Gamma \left (- \frac{5}{4}\right )} - \frac{\sqrt{6} \sqrt{\pi } C\left (\frac{\sqrt{6} x}{\sqrt{\pi }}\right ) \Gamma \left (- \frac{9}{4}\right )}{128 \Gamma \left (- \frac{5}{4}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.13131, size = 169, normalized size = 2.01 \begin{align*} -\left (\frac{1}{1152} i + \frac{1}{1152}\right ) \, \sqrt{6} \sqrt{\pi } \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{6} x\right ) + \left (\frac{1}{1152} i - \frac{1}{1152}\right ) \, \sqrt{6} \sqrt{\pi } \operatorname{erf}\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{6} x\right ) + \left (\frac{3}{128} i + \frac{3}{128}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} x\right ) - \left (\frac{3}{128} i - \frac{3}{128}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} x\right ) - \frac{1}{96} \,{\left (-2 i \, x^{3} + x\right )} e^{\left (3 i \, x^{2}\right )} - \frac{1}{32} \,{\left (2 i \, x^{3} - 3 \, x\right )} e^{\left (i \, x^{2}\right )} - \frac{1}{32} \,{\left (-2 i \, x^{3} - 3 \, x\right )} e^{\left (-i \, x^{2}\right )} - \frac{1}{96} \,{\left (2 i \, x^{3} + x\right )} e^{\left (-3 i \, x^{2}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]